package com.victualler.core.config.permission.controller.impl;

import com.victualler.core.base.controller.impl.BaseRestControllerImpl;
import com.victualler.core.config.permission.controller.UserRoleController;
import com.victualler.core.config.permission.dto.request.UserRoleSaveRequestDto;
import com.victualler.core.config.permission.entity.UserRoleDao;
import com.victualler.core.config.permission.repository.UserRoleQueryRepository;
import com.victualler.core.config.permission.repository.UserRoleRepository;
import com.victualler.core.config.permission.service.UserRoleService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Guoshichang
 * @discription:    
 */
@RestController
@RequestMapping("/core/config/permission/userRole")
public class UserRoleControllerImpl extends BaseRestControllerImpl<UserRoleDao,UserRoleRepository,UserRoleQueryRepository,UserRoleService> implements UserRoleController {
    /**
     * @author Guoshichang
     * @since 21:46 on 2018/9/9.
     * @param userRoleSaveRequestDto
     * @Function  保存角色的权限列表
     */
    @RequestMapping("/saveRoleByUserId")
    public void saveRoleByUserId(@RequestBody UserRoleSaveRequestDto userRoleSaveRequestDto) {
        this.baseService.saveRoleByUserId(userRoleSaveRequestDto);
    }

}
